package com.sec.foodit;

import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;

import com.nhn.android.maps.NMapActivity;
import com.nhn.android.maps.NMapController;
import com.nhn.android.maps.NMapView;
import com.nhn.android.maps.maplib.NGeoPoint;

public class RestActivity extends NMapActivity {

	private com.sec.foodit.ActivityManager am = com.sec.foodit.ActivityManager.getInstance();

	private static final String API_KEY = "532d059f983dce94d2e162dc176630c4";

	private NMapView mMapView;
	private NMapController mMapController;

	private static final NGeoPoint NMAP_LOCATION_DEFAULT = new NGeoPoint(127.032271, 37.4896091);
	private static final int NMAP_ZOOMLEVEL_DEFAULT = 13;
	private static final int NMAP_VIEW_MODE_DEFAULT = NMapView.VIEW_MODE_VECTOR;
	private static final boolean NMAP_TRAFFIC_MODE_DEFAULT = false;
	private static final boolean NMAP_BICYCLE_MODE_DEFAULT = false;

	private static final String KEY_ZOOM_LEVEL = "NMapViewer.zoomLevel";
	private static final String KEY_CENTER_LONGITUDE = "NMapViewer.centerLongitudeE6";
	private static final String KEY_CENTER_LATITUDE = "NMapViewer.centerLatitudeE6";
	private static final String KEY_VIEW_MODE = "NMapViewer.viewMode";
	private static final String KEY_TRAFFIC_MODE = "NMapViewer.trafficMode";
	private static final String KEY_BICYCLE_MODE = "NMapViewer.bicycleMode";


	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_rest);
		
		Log.e("foodit", "onCreate()::name: " + DataManager.getInstance().curRestName);
		String name = DataManager.getInstance().curRestName;
		//DataManager.getInstance().get
		

		getActionBar().hide();

		am.addActivity(this);

		// initialize map view
		mMapView = (NMapView)findViewById(R.id.mapView);
		mMapView.setApiKey(API_KEY);
		mMapView.setClickable(true);
		mMapView.setEnabled(true);
		mMapView.setFocusable(true);
		mMapView.setFocusableInTouchMode(true);
		mMapView.requestFocus();
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		return true; 
	}

	@Override
	protected void onDestroy() {
		super.onDestroy();
		am.removeActivity(this);
	}

}
